Fix CARGO_INCREMENTAL semantics to be intuitive
authorMalte Schwarzkopf <ms705-git@srcf.ucam.org>
Mon, 13 Feb 2017 00:56:41 +0000 (19:56 -0500)
committerMalte Schwarzkopf <ms705-git@srcf.ucam.org>
Mon, 13 Feb 2017 00:56:41 +0000 (19:56 -0500)
commit74cb863650b2bb8457531d29245e079350011a90
tree60ceba6c6efd159e7a7ff2e81c4c606f16f5342b
parent6f1b860da7aba4c5ea97a49de08a61f3f330e92d
Fix CARGO_INCREMENTAL semantics to be intuitive

Previously, the mere presence of a CARGO_INCREMENTAL variable in the
environment caused incremental compilation to happen. This has the very
unintuitive effect that `CARGO_INCREMENTAL=0` and even
`CARGO_INCREMENTAL=` mean incremental compilation is *on*.

This change brings the semantics in line with how they are defined in
the tests (cf. tests/build.rs:45), and in public-facing documentation
(https://internals.rust-lang.org/t/incremental-compilation-beta/4721).
src/cargo/ops/cargo_rustc/context.rs